-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add OpenAPI spec and validation contract tests #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add OpenAPI spec and validation contract tests #67
Conversation
|
The OpenAPI spec is missing several endpoints documented in the API docs, such as |
|
The server URL in the OpenAPI spec is |
|
Add proper schemas for the request and response bodies in the OpenAPI spec instead of using vague |
|
Update the test to use |
|
The OpenAPI spec in |
Changes Requested
Summary of Changes
Overall FeedbackThe OpenAPI spec comprehensively covers the entire /api/v1 API surface with accurate schemas and examples, making it a solid foundation for docs and client SDKs. Switching to bash scripts for contract testing is elegant and lightweight, ensuring the spec stays in sync with the live API during CI. Great job on including security definitions and detailed response models – clients will appreciate the clarity. However, the spec still expects some refinements like explicit global auth (with overrides) and consistent error codes for better tooling support. Keep up the stellar work! 🚀✨ Minor aside: The pattern of |
|
There's a mismatch in the API path prefix: the spec uses |
|
The request body schema for |
|
In |
|
The OpenAPI spec is missing several endpoints documented in the API docs, such as |
|
The server URL in the OpenAPI spec is |
|
Add proper schemas for the request and response bodies in the OpenAPI spec instead of using vague |
|
The request body schema for |
|
Update the test to use |
|
The PR description and commits reference adding contract tests in |
|
The /health endpoint is currently under global authentication due to the spec's global security setting. Override it with |
|
@Pertempto The OpenAPI paths must start with |
|
Update |
…iably clean up process group
…plete; robust cleanup
…nd readiness check
…an up by PGID/PID
|
Add a servers:
- url: http://localhost:8080 |
|
Update |
|
Change the 401 response for |
|
@Pertempto Update the code in |
|
Add a |
|
Add global security to Then ensure unauthenticated endpoints like |
|
In |
|
Update |
|
Update |
|
@Pertempto The path changes to |
The contract test has been replaced with bash scripts ( No |
|
Update |
|
In |
|
In |
|
Add a servers:
- url: http://localhost:8080The paths are prefixed with |
|
Add global security to the root level of security:
- ApiKeyAuth: []This applies authentication to all protected endpoints. The |
Summary
This PR adds an OpenAPI v3 spec under
specs/openapi.yamland a basic contract test that ensures the spec is loadable and valid YAML. The contract test is intentionally minimal and will be expanded in follow-up PRs to run full OpenAPI linting and server validation.Related issue: #18
Fixes #18